<include file="Public/header" />
<title>我的桌面</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 生产管理 <span class="c-gray en">&gt;</span> 转换单 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<form class="formleft" name="" id="" action="__URL__/index/" method="get">
			<span class="select-box" style="width:150px">
				<select class="select" id="selval" name="selval">
					<option value="1">转换单编号</option>	
					<option value="2">审核人</option>	
				</select>
			</span>
			<input class="input-text" style="width:200px" type="text" value="<{$_GET['keywords']}>" placeholder="输入查询关键词" name="keywords" datatype="*" nullmsg="请填写搜索词">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>	  
			<a href="javascript:;" onclick="inbound()" class="btn btn-danger radius">推送入库</a>
		</form>
		<span class="r">共有数据：<strong><{$count}></strong> 条</span> 
    </div>
	
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="12">转换单列表</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th width="120">编号</th>
				<th width="120">申请部门</th>
				<th width="">审核人</th>
				<th width="">审核状态</th>
				<th width="">状态</th>
				<th width="">审核时间</th>
				<th width="150">操作</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c">
				<td><input type="checkbox" class="ids" value="<{$vo.id}>" name="ids[]"></td>
				<td><{$vo.purchasing_no}></td>
				<td><{$vo.section_name.name}></td>
				<td><if condition="$vo.changelist_examined_status eq 0" >暂无<else /><{$vo.changelist_auditor}></if></td>
				<td>
				<if condition="$vo.changelist_examined_status eq 0" >暂无
				<elseif condition="$vo.changelist_examined_status eq 1" />审核通过
				<elseif condition="$vo.changelist_examined_status eq 2" />审核不通过
				</if>
				</td>				
				<td class="td-status"><if condition="$vo.changelist_examined_status eq 1"><span class="label label-success radius" onclick="admin_open('管理员编辑','__URL__/printproduct/cid/3/id/<{$vo.id}>','<{$vo.id}>','1100','600')" style="cursor:pointer">打印转换单</span><else/><span class="label radius">暂存</span></if></td>
				<td><{$vo.changelist_examine_time|date="Y-m-d H:i:s",###}></td>
				<td class="td-manage">
				<a title="审核" href="javascript:;" onclick="admin_open('管理员编辑','__URL__/examinedetail/cate/changelist/id/<{$vo.id}>','<{$vo.id}>','1000','')" class="ml-5" style="text-decoration:none"><if condition="$vo.changelist_examined_status neq 0">已审核<else />审核</if></a> 
				<if condition="$vo.change_status eq 1" >
					<a title="已添加" href="__URL__/edt_change/id/<{$vo.id}>" class="ml-5" style="text-decoration:none">已修改</a>
				<else />
					<a title="添加原料" href="__URL__/edt_change/id/<{$vo.id}>" class="ml-5" style="text-decoration:none">修改</a>
				</if>
				</td>
			</tr>
			</volist>			
		</tbody>
	</table>
	<div class="pages mt" style="text-align:right"><{$page}></div>
</div>
<include file="Public/footer" />
<include file="Public/footer_js" />
<script>
	function inbound(){
		var option = $(".ids");
		var checked_counts=0;
		var check_val = [];
        for(var i=0;i<option.length;i++){
			if(option[i].checked){
				checked_counts++;
				check_val.push(option[i].value);
			}
		}
		if(checked_counts==0){
			layer.msg('至少选中一个');
			return false;
		}else{
			$.ajax({
				type: 'POST',
				data: {ids:check_val},
				url: "<{:U('inbound_warehouse')}>",
				success:function(data){
					layer.msg(data.info);
					return false;
				}
			})
		}
		
	}

</script>
</body>
</html>